package com.dkm.ec.bbs.repository.impl;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.dkm.base.core.helper.SpringHelper;
import com.dkm.base.db.persistence.dao.IQueryDao;
import com.dkm.biz.repository.AbstractRepository;
import com.dkm.ec.bbs.domain.BbsPosts;
import com.dkm.ec.bbs.repository.BbsPostsRepository;
import com.dkm.ec.bbs.persistence.dao.BbsPostsQueryDao;
import com.dkm.ec.bbs.persistence.entity.BbsPostsPo;

/**
 * 对象功能:论坛帖子 Repository接口的实现类
 * 开发公司:dkm.com
 * 开发人员:ZHH
 * 创建时间:2017-05-24 17:42:12
 */
@Repository
public class BbsPostsRepositoryImpl extends AbstractRepository<String, BbsPostsPo,BbsPosts> implements BbsPostsRepository{
	  
	@Resource
	private  BbsPostsQueryDao bbsPostsQueryDao;

	public BbsPosts newInstance() {
		BbsPostsPo po = new BbsPostsPo();
		BbsPosts bbsPosts = SpringHelper.getBean(BbsPosts.class);
		bbsPosts.setData(po);
		return bbsPosts;
	}

	public BbsPosts newInstance(BbsPostsPo po) {
		BbsPosts bbsPosts = SpringHelper.getBean(BbsPosts.class);
		bbsPosts.setData(po);
		return bbsPosts;
	} 
	
	@Override
	protected IQueryDao<String, BbsPostsPo> getQueryDao() {
		return bbsPostsQueryDao;
	}
	
}
